﻿// ////////////////////////////////////////////////////////////////////////////
// 
// SWE Case Tool
// 
// Solution:	CaseTool
// Project:		1. CaseTool
// Filename:	Project.cs
// 
// File Created:	21:07 30.05.2013 
// Last Changed:	18:11 05.06.2013
// 
// ////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;

namespace SWE.CaseTool.GUI
{
	/// <summary>
	/// Holds general project information and Method specific data. There is a dictionary, in which
	/// each method is allowed to save a string, connected to their uniqe name, but there is no error
	/// handling!
	/// It is up to the programmer so save the data to the right place!
	/// The reason, that the data for each method is a string, is that before the refactoring for the new
	/// project requirement, we had partly implemented the xml export/import. So that the methods can use
	/// the existing
	/// xml import/export functions, we decided to use a string!.
	/// </summary>
	[Serializable]
	public class Project
	{
		private readonly GeneralProjectInformation _information = new GeneralProjectInformation();

		/// <summary>
		/// Initializes a new instance of the <see cref="Project" /> class.
		/// </summary>
		public Project()
		{
			Data = new Dictionary<string, string>();
			Requirements = new List<ProjectItem>();
			Functions = new List<ProjectItem>();
		}

		/// <summary>
		/// Holds the Method specific data
		/// </summary>
		/// <value>
		/// The method specified Sdata.
		/// </value>
		public Dictionary<string, string> Data { get; set; }

		/// <summary>
		/// Gets the general project information.
		/// </summary>
		/// <value>
		/// The general project information.
		/// </value>
		public GeneralProjectInformation Information
		{
			get { return _information; }
		}

		/// <summary>
		/// Gets or sets the name of the project.
		/// </summary>
		/// <value>
		/// The name of the project.
		/// </value>
		public string ProjectName { get; set; }

		/// <summary>
		/// Gets or sets the project functions.
		/// </summary>
		/// <value>
		/// The project functions.
		/// </value>
		public List<ProjectItem> Functions { private set; get; }

		/// <summary>
		/// Gets or sets the project requirements.
		/// </summary>
		/// <value>
		/// The the project requirements.
		/// </value>
		public List<ProjectItem> Requirements { private set; get; }
	}
}